import { FC, useState } from "react";
import styles from "./index.module.scss";
import { headList } from "../../../dataList/Headcomp";
import NavigationCompItem from "./compItem";
import { NavigatiionEnum } from "../../../enums/headComp";

const NavigetionComp: FC = ({ ...props }) => {
  const [naviCode, setNaviCode] = useState(NavigatiionEnum.MUSIC_HALL);

  return (
    <div className={styles.navigetionComp}>
      {headList.map((pre) => {
        return (
          <NavigationCompItem
            {...pre}
            {...props}
            naviCode={naviCode}
            onCheck={setNaviCode}
          />
        );
      })}
    </div>
  );
};
export default NavigetionComp;
